-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/insights remote lib #28
Conversation
Do not merge until uselagoon/lagoon-charts#578 is released |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
cmd/gatherInCluster.go
Outdated
//get the basic env vars | ||
if argStatic && argDynamic { | ||
log.Fatalf("Cannot use both 'static' and 'dynamic' only gatherers - exiting") | ||
os.Exit(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for a os.Exit with the log.FatalF right?
gatherers/insights-remote-writer.go
Outdated
insightsRemoteFacts.Facts = append(insightsRemoteFacts.Facts, f) | ||
} | ||
|
||
bodyString, _ := json.Marshal(insightsRemoteFacts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might want to have some error handling to this in a few places below to
bodyString, err := json.Marshal(insightsRemoteFacts)
if err != nil {
return fmt.Errorf("failed to marshal insights remote facts: %w", err)
}
This PR will add an "in cluster" gatherer for the new insights remote webservice